<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        section {
            width: 800px;
            height: 800px;
            border: 1px solid red;
            display: flex;

            /* 主方向的内容 */
            justify-content: center;

            /* 针对多行垂直排列方式， 需要提前设置的属性   diplay   flex-wrap */
            align-content: center;

            /* 换行显示 */
            flex-wrap: wrap;


        }

        div {
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    </style>
</head>

<body>

    <section>
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
    </section>



</body>

</html>